Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve code structure, layout, and theming of the project manager #74729

Merged

Conversation

YuriSizov
Copy link
Contributor

@YuriSizov YuriSizov commented Mar 10, 2023

Fixes #74214. Fixes #65734.
Builds on top of changes done in #30735.

The first commit contains a restructuring of the changes done in #30735, to bring them closer to our codestyle:

  • Classes were moved out of the CPP file and into the header;
  • Access modifiers were corrected, property and method order was changed to respect our normal structure (including access modifier block order);
    • As this commit aimed to do the least damage possible, I had to resort to befriending some classes. Some of that is resolved with the follow-up commits.
  • Some includes and names were cleaned up.

The second commit addresses #74214 and #65734 directly. It makes sure that the initial theme creation is properly set up, and it moves all the theme item fetching code to the correct notification, so changes can be picked up (not that there should be any, but still, code quality). Some properties were moved to the editor theme.

The third commit reworks the project list structure. While the earlier work in this component factored out some elements into their own control, layout was still generated out of that control and inside of the parent control. And it heavily relied on having access to the private properties of the class (effectively using it as a Node-based struct). So I reworked all of the relevant code and moved all of the layout of the list item component inside of that component, and for the list itself I exposed all the necessary API, cleaning up some weirdness and possible mistakes in the process. Theming was also centralized in the process.


I didn't use the manual theme cache system because, well, this is already a lot and there is probably not a lot of benefit from doing this right now. It can still be implemented in the future, alongside more useful changes to these components, but the current state should suffice as is.

Light mode works now, and that's what's important :)

godot windows editor dev x86_64_2023-03-10_16-39-47
image

@YuriSizov YuriSizov force-pushed the project-manager-baked-with-love branch from 6122d56 to d4c3cc4 Compare March 16, 2023 11:36
@akien-mga akien-mga merged commit 5c5f065 into godotengine:master Apr 3, 2023
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants